package com.hc.controller;

import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * @author hc
 * @date 2022/1/6 14:08
 */
@Controller
public class DispatchController {
    //@PreAuthorize("hasAuthority(\"spu:delete\")")
    @PreAuthorize("hasRole(\"vip\")")
    @GetMapping("/openSecret")
    String openSecret() {
        return "secret";
    }

    @GetMapping("/openLogin")
    String openLogin() {
        return "login";
    }

    @GetMapping("/openIndex")
    String index() {
        return "index";
    }

    @GetMapping("/open403")
    String open403() {
        return "403";
    }

    @GetMapping("/openDemo")
    String openDemo(){
        return "demo";
    }

}
